﻿using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;

public class mTest3 : MonoBehaviour
{

    public Animator animator;
    void OnGUI()
    {
        int index = 0;

        if (GUI.Button(new Rect(10, 10 + (index++) * 30, 150, 30), "idle"))
            animator.Play("idle");

        if (GUI.Button(new Rect(10, 10 + (index++) * 30, 150, 30), "run"))
            animator.Play("run");

        if (GUI.Button(new Rect(10, 10 + (index++) * 30, 150, 30), "charge"))
            animator.Play("charge");

        if (GUI.Button(new Rect(10, 10 + (index++) * 30, 150, 30), "attack"))
            animator.Play("attack");

        if (GUI.Button(new Rect(10, 10 + (index++) * 30, 150, 30), "dead"))
            animator.Play("dead");
    }
}
